import time
import os

def jsplit(base,path):
    whole_path = os.path.join(base,path)
    p,n = os.path.split(whole_path)
    return p,n,whole_path

def ffcount(status):
    return {
        'size':0,
        'dir':len([stat for stat in status if stat['type']=='dir']),
        'file':len([stat for stat in status if stat['type']=='file'])
    }
